#include <stdio.h>
int main ()
{
	float num,total,average,n;
    n=0;
	total = 0 ;
	num = 1;
	while ( num != 0 )
	{
		printf("please enter a number (0 to finish) ");
		scanf( "%f",&num );
		total +=num;
		n+=1;
		printf("the running total is %f\n",total );
		average=total/n;
	printf("the final total is %f\n",total);
	printf("The average is %f\n\n",average);
	}
    return 0;
}